import java.lang.reflect.Proxy;

public class Client {
    public static void main(String[] args) {
        OrderService orderService = new OrderServiceImpl();
        OrderService orderServiceProxy = (OrderService) Proxy.newProxyInstance(orderService.getClass().getClassLoader(),
                orderService.getClass().getInterfaces(),
                new OrderInvokeHandler(orderService));
        orderServiceProxy.generateOrder();
        orderServiceProxy.modifyOrder();
        orderServiceProxy.deleteOrder();
    }
}
